<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "{{%delivery}}".
 *
 * @property integer $id
 * @property string $name
 * @property string $contacts
 * @property string $address
 * @property string $tel
 * @property string $mobile
 */
class Delivery extends \common\models\AR
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%delivery}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['name', 'contacts', 'address'], 'required'],
            [['name', 'contacts', 'tel'], 'string', 'max' => 45],
            [['address'], 'string', 'max' => 100],
            [['mobile'], 'string', 'max' => 15]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => '名称',
            'contacts' => '联系人',
            'address' => '地址',
            'tel' => '固定电话',
            'mobile' => '手机号',
        ];
    }
}
